﻿<%@ Page Language="C#" MasterPageFile="~/provider/TravelInsurance/TravelInsurance.master"
    AutoEventWireup="true" CodeFile="ViewProviderTIAge.aspx.cs" Inherits="Provider_TravelInsurance_ViewProviderTIAge" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="provider_inner">
        <h1>
            Age Eligibility
        </h1>
      <%--  <div class="right_action">
            <asp:HyperLink runat="server" ID="lnkNewClaimInfo" NavigateUrl="~/Provider/TravelInsurance/ProviderTIAge.aspx"
                Text="New"></asp:HyperLink>
        </div>--%>
        <fieldset>
            <dl>
                <dt>
                    <label>
                        Type of policy</label></dt>
                <dd>
                    <asp:DropDownList ID="ddlPolicyType" runat="server" class="text" AutoPostBack="true">
                        <asp:ListItem Selected="True" Value="-1">Select</asp:ListItem>
                        <asp:ListItem Value="Individual">Individual</asp:ListItem>
                        <asp:ListItem Value="IndividualSpouse">Individual + Spouse</asp:ListItem>
                        <asp:ListItem Value="IndividualChild">Individual + Child</asp:ListItem>
                        <asp:ListItem Value="Family">Family</asp:ListItem>
                    </asp:DropDownList>
                    <asp:TextBox ID="txtProviderComId" runat="server" Text="0" Visible="false"></asp:TextBox>
                </dd>
            </dl>
        </fieldset>
        <asp:GridView ID="grvTI" runat="server" AllowPaging="True" AutoGenerateColumns="false"
            CellPadding="2" DataKeyNames="TAAgeID" EmptyDataText="There are no data records to display."
            DataSourceID="sqlDsTI" CssClass="progridstyle" GridLines="None" >
            <Columns>
                <asp:BoundField DataField="TAAgeID" HeaderText="TAAgeID" InsertVisible="False" ReadOnly="True"
                    SortExpression="TAAgeID" Visible="False" />
                    <asp:BoundField DataField="PlanType" HeaderText="Policy Type" SortExpression="PlanType" />
                <%--<asp:TemplateField HeaderText="Plan Name">
                    <ItemTemplate><asp:Label ID="lblPlan" runat="server" Text='<%#  GetPlanName(Eval("ProviderCompanyId"), Eval("PlanType"), Eval("CoverageLevel")) %>'> ></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>     --%>                           
                <asp:BoundField DataField="PlanName" HeaderText="Plan Name" SortExpression="PlanName" />
                <asp:BoundField DataField="AdultAgeFrom" HeaderText="Adult Age From" SortExpression="AdultAgeFrom" />
                <asp:BoundField DataField="AdultAgeTo" HeaderText="Adult Age To" SortExpression="AdultAgeTo" />
                <asp:BoundField DataField="ChildAgeFrom" HeaderText="Child Age From" SortExpression="ChildAgeFrom" />
                <asp:BoundField DataField="ChildAgeTo" HeaderText="Child Age To" SortExpression="ChildAgeTo" />
                 <asp:BoundField DataField="ModifiedDate" HeaderText="Modified Date" SortExpression="ModifiedDate" />
                <asp:HyperLinkField HeaderText="BrowserInfo" Text="Select" Target="_self" DataNavigateUrlFormatString="ProviderTIAge.aspx?COV={0}&TID={1}"
                    DataNavigateUrlFields="PlanType, TAInsId"></asp:HyperLinkField>
            </Columns>
            <FooterStyle />
            <PagerStyle />
            <SelectedRowStyle CssClass="progridover" />
            <HeaderStyle CssClass="progridheader" />
            <EditRowStyle />
            <AlternatingRowStyle CssClass="progridodd" />
            <RowStyle CssClass="progrideven" />
        </asp:GridView>
        <asp:SqlDataSource ID="sqlDsTI" runat="server" ConnectionString="<%$ ConnectionStrings:CE_DBConnectionString %>"
            SelectCommand="sprocProviderTAAgeSelectItemList" SelectCommandType="StoredProcedure">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddlPolicyType" Name="PlanType" PropertyName="SelectedValue"
                    Type="String" />
                <asp:ControlParameter ControlID="txtProviderComId" Name="ProviderCompanyID" PropertyName="Text"
                    Type="Int64" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:ImageButton OnClientClick="javascript:return confirm('Are you sure to go back?');"
            ID="ibtBack" runat="server" ImageUrl="~/Provider/images/buttons/back1.gif" OnClick="ibtBack_Click" />
    </div>
</asp:Content>
